home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / vidhrdw / skychut.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  2KB  |  79 lines

  1. /***************************************************************************
  2.  
  3.   vidhrdw.c
  4.  
  5.   Functions to emulate the video hardware of the machine.
  6.  
  7.   (c) 12/2/1998 Lee Taylor
  8.  
  9. ***************************************************************************/
  10.  
  11. #include "driver.h"
  12. #include "vidhrdw/generic.h"
  13.  
  14.  
  15.  
  16. static int flipscreen;
  17.  
  18.  
  19. WRITE_HANDLER( skychut_vh_flipscreen_w )
  20. {
  21. /*    if (flipscreen != (data & 0x8f))
  22.     {
  23.         flipscreen = (data & 0x8f);
  24.         memset(dirtybuffer,1,videoram_size);
  25.     }
  26. */
  27. }
  28.  
  29.  
  30. WRITE_HANDLER( skychut_colorram_w )
  31. {
  32.     if (colorram[offset] != data)
  33.     {
  34.         dirtybuffer[offset] = 1;
  35.  
  36.         colorram[offset] = data;
  37.     }
  38. }
  39.  
  40.  
  41.  
  42. /***************************************************************************
  43.  
  44.   Draw the game screen in the given osd_bitmap.
  45.   Do NOT call osd_update_display() from this function, it will be called by
  46.   the main emulation engine.
  47.  
  48. ***************************************************************************/
  49. void skychut_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
  50. {
  51.     int offs;
  52.     if (full_refresh)
  53.         memset (dirtybuffer, 1, videoram_size);
  54.  
  55.     for (offs = videoram_size - 1;offs >= 0;offs--)
  56.     {
  57.         if (dirtybuffer[offs])
  58.         {
  59.             int sx,sy;
  60.  
  61.  
  62.             dirtybuffer[offs] = 0;
  63.  
  64.             sx = offs % 32;
  65.             sy = offs / 32;
  66.  
  67.             drawgfx(bitmap,Machine->gfx[0],
  68.                     videoram[offs],
  69.                      colorram[offs],
  70.                     flipscreen,flipscreen,
  71.                     8*sx,8*sy,
  72.                     &Machine->drv->visible_area,TRANSPARENCY_NONE,0);
  73.  
  74.  
  75.         }
  76.     }
  77.  
  78. }
  79.